Let's recall the concepts required
to perform the practice exercise. Javascript is a dynamically
typed language. Mocha is a Javascript test framework
running on Node.Js and in the browser. Chai is a BDD/TDD assertion library for
Node.Js and the browser that can be paired with
any Javascript testing framework. Mocha is a framework and
chai is a library. Write the test cases inside the it block. Collectively, all these test cases
will be grouped under a test suite or the described block. And use the hooks before,
before each, after and after each to set up and
clean up test data or requirements. It's increasingly difficult for businesses
to remain competitive in retail. The reasons are high rental fees
to maintain a physical store. The difficulty in hiring lower
skilled sales assistance and increase in online shopping on platforms
such as Amazon, Alibaba and so on. Even big companies such as Reliance,
Walmart and Apple have developed online shops and E commerce apps making
the market even more competitive. EBuy group is the leading retailer. EBuy has decided to build
a new independent and seamless e commerce app to use and
interact. A shopping app is an app that
enables users to shop for products on any smart device. The application provides multiple
features to all its registered users. The users need to register with
the application to access some features. In this section,
you will perform the exercise to implement microservices in the online
shopping application Ebuy app. While implementing
microservices in the EBuy app, you need to perform the following tasks. Create the parent project called EBuy app, install all the necessary dependencies
by using the NPM install command. Create User AuthenticationService
that uses the MYSQL database. Create user product
service that uses MongoDB. Right appropriate exception
handling techniques, write test cases for
all the layers of both the applications.. While performing the practice exercise,
you must ensure that the solution is developed based
on the boilerplate code provided. VS Code and Node.Js are installed. Express and
Mongoose dependencies are installed. The Array Model class object is used for
representing the data. A server is created to
handle the request and the program is executed using the NPM
start command or by using Nodeman.